using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ThuySan.Bussiness
{
	[Serializable]
	[Table("[dbo].[Category]")]
	public partial class Category
	{

		#region Properties

		[Key]
		[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[Required]
		[Column("CategoryId")]
		public System.Int32 CategoryId { get; set; }

		[Column("Name")]
		public System.String Name { get; set; }

		[Column("Description")]
		public System.String Description { get; set; }

		[Column("Detail")]
		public System.String Detail { get; set; }

		[Column("PageUrl")]
		public System.String PageUrl { get; set; }

		[Required]
		[Column("IsCategoryMenu")]
		public System.Boolean IsCategoryMenu { get; set; }

		[Column("Priority")]
		public System.Int32? Priority { get; set; }

		#endregion

		#region Navigation

		[ForeignKey("CategoryId")]
		public virtual ICollection<CategoryProperty> CategoryPropertys { get; set; }
		[ForeignKey("CategoryId")]
		public virtual ICollection<CategoryTag> CategoryTags { get; set; }
		[ForeignKey("CategoryId")]
		public virtual ICollection<Product> Products { get; set; }

		#endregion

	}
}
